package com.csii.adhoc.dataunits.dao;

import com.csii.adhoc.dataunits.mapper.*;
import com.csii.adhoc.dblink.DbLinkPo;
import com.csii.common.DataFromVo;
import org.springframework.stereotype.Repository;

import javax.annotation.Resource;
import java.util.List;

@Repository
public class DataSourceDao {

    @Resource
    DataUnitsMapper dataUnitsMapper;

    public List<DbLinkPo> selectAllDataSource() {
        return dataUnitsMapper.selectAllDataSource();
    }

    public DataFromVo getConnIdByTableId(String tableId) {
        // 恢复默认数据源
        DataFromVo dataFromVO = dataUnitsMapper.getConnIdByTableId(tableId);
        return dataFromVO;
    }
   }
